Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

fix(challenges): fix test in hr challenge #189

Merged
merged 1 commit into from Jul 28, 2018
Merged

fix(challenges): fix test in hr challenge #189

merged 1 commit into from Jul 28, 2018

Conversation

cellux
Copy link
Contributor

@cellux cellux commented Jul 28, 2018

The current test never matches: in the html, </h4> is followed by <p>, not <em>

Description

Pre-Submission Checklist

  • Your pull request targets the dev branch.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/challenge-tests)
  • All new and existing tests pass the command npm test.
  • Use npm run commit to generate a conventional commit message.
    Learn more here: https://conventionalcommits.org/#why-use-conventional-commits
  • The changes were done locally on your machine and NOT GitHub web interface.
    If they were done on the web interface you have ensured that you are creating conventional commit messages.

Checklist:

  • Tested changes locally.
  • Addressed currently open issue (replace XXXXX with an issue no in next line)

Closes #17944

the current test never matches: in the html, </h4> is followed by <p>, not <em>
Copy link
Contributor

@johnkennedy9147 johnkennedy9147 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cellux LGTM thanks for your contribution.
@raisedadead one of the changes (#181) released yesterday has broken a test on one of the challenges. I quickly skimmed over the other changes in the PR and dont think it adversely affected anything else.

@raisedadead
Copy link
Member

Hi @johnkennedy9147 do we know of what line needs to be updated? I can do a quick release based on that.

@johnkennedy9147
Copy link
Contributor

this PR (#189) fixes (tag order was swapped in #181)

@raisedadead
Copy link
Member

Perfect. I'll get this released.

raisedadead pushed a commit that referenced this pull request Jul 31, 2018
## [3.1.2](v3.1.1...v3.1.2) (2018-07-31)

### Bug Fixes

* **challenges:** allow for omitted unit after zero values ([45b573b](45b573b)), closes [#166](#166)
* **challenges:** changed complementary color for blue to orange ([e41f078](e41f078)), closes [#17934](https://github.com/freeCodeCamp/curriculum/issues/17934)
* **challenges:** fix test in hr challenge ([#189](#189)) ([2edb306](2edb306))
* **challenges:** fix third test for template literals ([b8d004e](b8d004e)), closes [#135](#135)
* **challenges:** fixes escaping of ([fd8c9e4](fd8c9e4))
* **scripts:** fix unpack and repack scripts for the new challenge schema ([52ed7cf](52ed7cf))
@raisedadead
Copy link
Member

🎉 This PR is included in version 3.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@RandellDawson
Copy link
Member

@raisedadead Is there an ETA for this fix to be rolled into the production site? I saw that it was committed back on July 28th. I am surprised this has not been released to production. How do these releases work? What determines when a committed fix will go into production? I am trying to understand the process. I am wanting to help out, by starting to work on a few issue items, but I would like to have a better understanding of the flow of how things go from being committed vs. being released. Any insight you can provide would be great.

Thank you.

@raisedadead
Copy link
Member

Hi @Bahsoun @RandellDawson

Apologies about the delay. Unfortunately some schema changes have broken the tests on the main repository.

More details are available on #204

We are working on a way to get these conflicts addressed. But until that happens I am afraid the fixes can't be rolled to the site as it is. That said please be rest assured that we working on this on priority.

@raisedadead
Copy link
Member

@RandellDawson just to address your queries:

How do these ...

Currently, we are publishing a npm package every few days on this repository. That happens when everything from dev moves into the master. This is done by me mostly.

Once a package is published, we are updating the same on both learn and the freeCodeCamp repositories. This is just an update to the package.json

Finally, once everything is ready on both the repos (i.e, tests look good). Then we go in and do a deployment (which is a DevOps step by freeCodeCamp team) on the actually servers.

We are trying to re-architecture a bit of this flow, at the minute to avoid schema conflicts as notes in the linked issue, and hence avoid the blockage.

@RandellDawson
Copy link
Member

I am not sure what skillset I would need to begin to help you out for this current issue raised in #204, but if you can let me know, then I would be happy to attempt something. We are getting slammed on the forum with that one particular challenge. I also noticed some actually modified the Guide to reflect the following:

Bug in the lesson
If you come across the “the hr tag should appear between the title and the paragraph” issue and you’re certain that you completed the objective correctly, check out this useful suggestion from @spacecadet on the forums.

The really sad part about the above Guide reference is it actually suggests using a "hack" by another camper to pass the challenge tests. That "hack" promotes invalid html syntax. I want to help eliminate the need for the FCC Guide to suggest hacks for solutions to the challenges.

Out of curiosity, why weren't the changes from #127 rolled back, once it was known to break the curriculum?

@RaspberryLime
Copy link

Can the suggestion for the “hack” be removed from the Guide?

If it can’t, can’t a moderator edit that linked post on the message board so that either a warning about it being invalid HTML is added, or the whole post is deleted and replaced with something like:

SpaceCatInd found a way to alter the HTML to get the horizontal rule test to “pass”, and tried to help everyone else by sharing their workaround here. Sadly though, the workaround uses invalid HTML, which you shouldn’t write as it can cause problems with real webpages. So we’ve removed the details of the workaround. The problem will eventually be fixed. In the meantime though, please skip the test by clicking on “curriculum” at the top of the page, and then click on “Applied Visual Design” and start on the next test “Adjust the background-color Property of Text”. You’ll then be able to carry on with the other challenges as normal. Please note that you do not need to have completed every challenge in order to claim certificates or complete projects later on, so it will not hinder your progress through the course.

@raisedadead
Copy link
Member

Hi @RandellDawson

We have just prepared pull requests:

freeCodeCamp/freeCodeCamp#18160
freeCodeCamp/learn#300

These will be deployed soon, these fix the blocking issue of the broken tests.

These also have all the latest changes to the curriculum with a freshly published package, can you or someone else dive in and guide what else needs to be done to fix the challenge in discussion.?

If the instructions are to be modified? Or they are already done in the code and just need to be deployed? Correct?

@raisedadead
Copy link
Member

P.S: If you have any issue no.s that we have already, it'd be awesome for me to track all this myself.

@RandellDawson
Copy link
Member

These also have all the latest changes to the curriculum with a freshly published package, can you or someone else dive in and guide what else needs to be done to fix the challenge in discussion.?
If the instructions are to be modified? Or they are already done in the code and just need to be deployed? Correct?

@raisedadead I will take a look at this particular challenge (HR element challenge) for sure. What is the easiest way for me to review other challenges which will be deployed in the same release? I don't mind reviewing all of them, but I am not as familiar with how to do that on Github, so I could use a point in the right direction/method. Thanks for getting all this ready go!

@scissorsneedfoodtoo
Copy link
Contributor

@RandellDawson, here's the changelog with all of the challenges that have been updated or added for each release. Thank you for helping out with the guide! Would be best to get the hack/invalid method out of there as soon as we can.

@RandellDawson
Copy link
Member

@scissorsneedfoodtoo So how many versions should I go back to review? I ask, because it is my understanding that the curriculum has not been able to update for quite some time.

@scissorsneedfoodtoo
Copy link
Contributor

@RandellDawson, the current version used on Learn is 3.1.1, so I'm thinking just 3.1.2 and the latest 3.2.0 will need to be reviewed. Here are a few changes from 3.1.2 and 3.2.0 that stand out and might require changes in the guide:

Also, there was a new challenge added in the last release:

@RandellDawson
Copy link
Member

@raisedadead Sorry, but I have one last question. If I do find anything that might need to be changed, should I make a comment on the issue # referenced in the changelog or in this particular thread? I had a question about the fix implemented for one of the issues I originally raised.

@RandellDawson
Copy link
Member

@raisedadead - It took me a while, but I reviewed many of the fixes put into place in the releases 3.12 and 3.2.0. Below is the list. I marked either OK if everything looked fine to me or DID NOT REVIEW. If you would prefer me to delete this large comment let me know.

The only change I reviewed which seemed not to have all of the suggestions implemented was (ded4705, closes #[199 ].
(#199 The suggestion to make semi-colons optional at end of line was not implemented in the regular expression. The decision to making them optional would not just affect this challenge, but almost all JavaScript challenges, So, what is the verdict regarding making semi-colons optional at the end of lines in the JavaScript challenges?

RELEASE 3.2.0 (2018-09-20)
Bug Fixes
a sentence didn't make sense, so I modified it (3d77920), closes #18046 - OK
add missing test to check for for css class (6e42f53), closes #254 - OK
add note at bottom of description in d3 challenge (c60d332), closes #17767 - DID NOT REVIEW
add solution, test to project euler problems (f572324) - DID NOT REVIEW
add solutions to first 3 debugging challenges (c2e5794) - OK
add test to check user is using \W in Regex (296cf44) - OK
add test to lookahead regex challenge (e044de4), closes #209 - OK
added code tags (065036b), closes #18054 - OK
added solutions to project euler problems 28, 31 (5e12499) - DID NOT REVIEW
adding code tags to description (57d5b55), closes #17911 - OK
adding negative integer to challenge to improve tests (#211) (2adc516) - OK
allow user to comment out undesired code (72c2407) - OK - should this be implemented on all challenges?
challenge description is formatted and concised (dcd8e45) - DID NOT REVIEW
change challengeType to fix help button (ddcc661) - DID NOT REVIEW
change definition of complementary colors (#299) (c022dff) - OK
check for shorthand character in regex (#238) (0bf8d32) - DID NOT REVIEW
commented output was wrong (3cb972e) - OK
converts delete html test to regex (d80d98d), closes #251 - DID NOT REVIEW
corrected challenge instructions (159203a) - OK
fix #17155 (cb21e59) - DID NOT REVIEW
fix confusing destructuring es6 challenge (1a4f6a8), closes #213 - OK
fix description in css variable fallback challenge (bc33a03), closes freeCodeCamp/freeCodeCamp#17546 - DID NOT REVIEW
fix flex direction row regex (25ea07e), closes #260 - OK
fix grammar and spelling errors (#244) (b0c0b74) - OK
fix grid-gap shorthand regex (#232) (a49f45e), closes #229 - DID NOT REVIEW
fix grid-gap shorthand regex (#237) (b369fa0), closes #229 - DID NOT REVIEW
fix regex in a JS challenge (#257) (6058da3) - OK
fix typo in wrap-reverse description (434ea5c) - OK
fixed challenge accepted without any new code (96b39c1), closes #198 - DID NOT REVIEW
fixed esc chars in managing packages with npm lesson (6335a15) - DID NOT REVIEW
fixed tests to check for pre operators (ded4705), closes #199 - The suggestion to make semi-colons optional at EOL was not implemented in the regular expression
fixed typo in algorithms and ds (31957a4) - OK
Incorrect html closing tag (a1464f0) - OK
insufficient objectives for javascript_algorithm/es6/19 (7707b18) - OK
missing space in code example (c50cc4e) - OK
remove race condition from react lifecycle challenge (a20ac56) - DID NOT REVIEW
removed duplicate css top property (0a79c58) - OK
rephrased wording in applied visual design (#268) (d560d58) - OK
replaced em tags with code tags (68daaf7), closes #18048 - OK
reword test text and improve test accuracy (f834a98) - DID NOT REVIEW
small edit to correct sematic issues (322bf80) - DID NOT REVIEW
clickjacking challenge description (037990c) - DID NOT REVIEW
spelling and grammar errors addressed (8f17adf) - OK
typo (4f7faba) - OK
update test and add solution for DS challenge (d1b2075), closes #164 - DID NOT REVIEW
Update test to include whitespace (#272) (77689f4), closes #271 - OK
schema: change schema and unpack script (b014b23) - OK

Features
add browser fallback challenge (b090e8b), closes freeCodeCamp/freeCodeCamp#17546 - DID NOT REVIEW


RELEASE 3.1.2 (2018-07-31)
Bug Fixes
allow for omitted unit after zero values (45b573b), closes #166 - OK
changed complementary color for blue to orange (e41f078), closes #17934 - OK
fix test in hr challenge (#189) (2edb306) - OK
fix third test for template literals (b8d004e), closes #135 - OK
fixes escaping of (fd8c9e4) - OK
scripts: fix unpack and repack scripts for the new challenge schema (52ed7cf) - DID NOT REVIEW

@raisedadead
Copy link
Member

@RandellDawson

Thanks for taking the time to review all these:

So, what is the verdict regarding making semi-colons optional at the end of lines in the JavaScript challenges?

IMHO, we don't want it to be optional.

This has been discussed time and again on the main repo, and I totally understand the desire to have the flexibility. However, just to re-iterate a majority of the users are new to coding, and I think its best that they are made aware of the nuances of a language like JS, which while being OK with not having semi-colons, and be messy to debug if, you have a bug, that is pure syntax oriented.

Here is an article you can refer to for more insight
https://hackernoon.com/an-open-letter-to-javascript-leaders-regarding-no-semicolons-82cec422d67d

@raisedadead
Copy link
Member

Side note: I have just deployed the latest v3.2.0 to production. Please feel free to redirect fresh bugs as issues on the main repo.

@RaspberryLime
Copy link

I agree with enforcing semicolons in JavaScript and not making them optional.

If you’ve never had to wade through hundreds of lines of JS code to track down a bug, in one solitary browser, to discover all you needed to do was add in a semicolon at the end of a line... just no. Newbies will see it like CSS anyway; you need the semicolons there too.

@RaspberryLime
Copy link

Side note: I have just deployed the latest v3.2.0 to production. Please feel free to redirect fresh bugs as issues on the main repo.

The “hr” test now passes OK for me, but there’s still reference to the hacky “workaround” in the “get a hint” area. Is there already an issue somewhere to take care of removing that? (I am somewhat confused as to the different repos and what issues are appropriate where.)

@raisedadead
Copy link
Member

@RaspberryLime please feel free to open a PR if you would be interested to remove the instructions on this repository.

Issues maybe open on https://github.com/freeCodeCamp/freeCodeCamp/issues, but aren't necessary if the change is decided to be made anyways.

You can search for the string on the top of this page to look for the file that needs modification.

Thanks

@RandellDawson
Copy link
Member

@raisedadead Since the Get a hint just links to the Guide which is what actually needs updating, wouldn't the issue need to be created at https://github.com/freeCodeCamp/guide/issues ?

@RaspberryLime I just posted a reply over at freeCodeCamp/guide#8341 to see if we need to create another issue to get it removed from the guide,

@raisedadead
Copy link
Member

Hi @RandellDawson thanks a lot for pointing me to the location I have prepared freeCodeCamp/guide#8668

Can you please take a quick moment and let me know if it looks good?

@RaspberryLime
Copy link

@RandellDawson and @raisedadead thank you! I was going to try and work out how to start a PR but I’ll try that another time.

@RandellDawson
Copy link
Member

Can you please take a quick moment and let me know if it looks good?

@raisedadead Sorry for not letting you know sooner, but I was offline for a couple of days. It looks fine to me. Go with it. Thanks for your help. Hopefully, there can be some kind of policy decision on whether or not workarounds you ever be in the Guide. @QuincyLarson - What are your thoughts on this issue?

@RaspberryLime
Copy link

I would say workarounds are OK if they’re valid HTML/CSS or whatever. Teaching a second correct way of doing something isn’t a bad thing. But illegally nesting HTML tags? No.

@RandellDawson
Copy link
Member

But illegally nesting HTML tags? No.

I agree.

@raisedadead
Copy link
Member

Hi @RandellDawson all the fixes are live now, and the guide has be updated to remove the instructions in the question.

Since the discussion here is beyond the scope of this PR itself. Let's discuss any additional topics on the forum or a separate Issue on the main repo as you feel suitable?

Thanks.

@RandellDawson
Copy link
Member

No problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants